package com.jdz.entities;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class FlyRow {

    private int id;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
//时间信息

    private double time;
    private String stan_time;//标准时间
    private int file_id;
    //纬度信息
    private double GPS_LAT_du;
    private double GPS_LAT_fen;
    private double GPS_LAT_miao;
    //精度信息
    private double GPS_LONG_du;
    private double GPS_LONG_fen;
    private double GPS_LONG_miao;
    //
    private double GPS_H_miao;
    //指示空速
    private double indicated_airspeed;
    //扭矩
    private double torque;
    //旋翼速度
    private double rotor_speed;
    //燃油重量
    private double fuel_weight;
    //气压高度
    private double barometric_height;
    //大气静温
    private double static_temperature;


    public FlyRow() {
    }
    //有参构造方法
    public FlyRow(String[] data) {

        this.time = Double.parseDouble(data[0]);
        this.stan_time=String.format("%02d",(int)time/3600)+":"+String.format("%02d",(int)time%3600/60)+":"+time%3600%60;
        this.GPS_LAT_du = Double.parseDouble(data[1]);
        this.GPS_LAT_fen = Double.parseDouble(data[2]);
        this.GPS_LAT_miao = Double.parseDouble(data[3]);
        this.GPS_LONG_du = Double.parseDouble(data[4]);
        this.GPS_LONG_fen = Double.parseDouble(data[5]);
        this.GPS_LONG_miao = Double.parseDouble(data[6]);
        this.GPS_H_miao= Double.parseDouble(data[7]);
        indicated_airspeed = Double.parseDouble(data[8]);
        this.torque = Double.parseDouble(data[9]);
        rotor_speed = Double.parseDouble(data[10]);
        fuel_weight = Double.parseDouble(data[11]);
        barometric_height = Double.parseDouble(data[12]);
        this.static_temperature = Double.parseDouble(data[13]);
    }
    //有参构造方法
    public FlyRow(double[] data) {

        this.time = data[0];
        this.stan_time=String.format("%02d",(int)time/3600)+":"+String.format("%02d",(int)time%3600/60)+":"+time%3600%60;
        this.GPS_LAT_du = data[1];
        this.GPS_LAT_fen = data[2];
        this.GPS_LAT_miao = data[3];
        this.GPS_LONG_du = data[4];
        this.GPS_LONG_fen = data[5];
        this.GPS_LONG_miao = data[6];
        this.GPS_H_miao = data[7];
        indicated_airspeed = data[8];
        this.torque = data[9];
        rotor_speed =data[10];
        fuel_weight = data[11];
        barometric_height = data[12];
        this.static_temperature =data[13];
    }
    public double getTime() {
        return time;
    }

    public void setTime(double time) {
        this.time = time;
    }

    public double getGPS_LAT_du() {
        return GPS_LAT_du;
    }

    public void setGPS_LAT_du(double GPS_LAT_du) {
        this.GPS_LAT_du = GPS_LAT_du;
    }

    public double getGPS_LAT_fen() {
        return GPS_LAT_fen;
    }

    public void setGPS_LAT_fen(double GPS_LAT_fen) {
        this.GPS_LAT_fen = GPS_LAT_fen;
    }

    public double getGPS_LAT_miao() {
        return GPS_LAT_miao;
    }

    public void setGPS_LAT_miao(double GPS_LAT_miao) {
        this.GPS_LAT_miao = GPS_LAT_miao;
    }

    public double getGPS_LONG_du() {
        return GPS_LONG_du;
    }

    public void setGPS_LONG_du(double GPS_LONG_du) {
        this.GPS_LONG_du = GPS_LONG_du;
    }

    public double getGPS_LONG_fen() {
        return GPS_LONG_fen;
    }

    public void setGPS_LONG_fen(double GPS_LONG_fen) {
        this.GPS_LONG_fen = GPS_LONG_fen;
    }

    public double getGPS_LONG_miao() {
        return GPS_LONG_miao;
    }

    public void setGPS_LONG_miao(double GPS_LONG_miao) {
        this.GPS_LONG_miao = GPS_LONG_miao;
    }

    public double getindicated_airspeed() {
        return indicated_airspeed;
    }

    public void setindicated_airspeed(double indicated_airspeed) {
        indicated_airspeed = indicated_airspeed;
    }

    public double getTorque() {
        return torque;
    }

    public void setTorque(double torque) {
        this.torque = torque;
    }

    public double getrotor_speed() {
        return rotor_speed;
    }

    public void setrotor_speed(double rotor_speed) {
        rotor_speed = rotor_speed;
    }

    public double getfuel_weight() {
        return fuel_weight;
    }

    public void setfuel_weight(double fuel_weight) {
        fuel_weight = fuel_weight;
    }

    public double getbarometric_height() {
        return barometric_height;
    }

    public void setbarometric_height(double barometric_height) {
        barometric_height = barometric_height;
    }

    public double getStatic_temperature() {
        return static_temperature;
    }

    public void setStatic_temperature(double static_temperature) {
        this.static_temperature = static_temperature;
    }

    public String getStan_time() {
        return stan_time;
    }

    public void setStan_time(String stan_time) {
        this.stan_time = stan_time;
    }



    public double getGPS_H_miao() {
        return GPS_H_miao;
    }

    public void setGPS_H_miao(double GPS_H_miao) {
        this.GPS_H_miao = GPS_H_miao;
    }

    @Override
    public String toString() {
        return "FlyInfo{" +
                "time=" + time +
                ", 标准时间=" + stan_time +
                ", GPS_LAT_du=" + GPS_LAT_du +
                ", GPS_LAT_fen=" + GPS_LAT_fen +
                ", GPS_LAT_miao=" + GPS_LAT_miao +
                ", GPS_LONG_du=" + GPS_LONG_du +
                ", GPS_LONG_fen=" + GPS_LONG_fen +
                ", GPS_LONG_miao=" + GPS_LONG_miao +
                ", GPS_H=" + GPS_H_miao +
                ", 指示空速：indicated_airspeed=" + indicated_airspeed +
                ", 扭矩：torque=" + torque +
                ", 旋翼转速：rotor_speed=" + rotor_speed +
                ", 燃油重量：fuel_weight=" + fuel_weight +
                ", 气压高度：barometric_height=" + barometric_height +
                ", 大气静温：static_temperature=" + static_temperature +
                '}';
    }

    public int getFile_id() {
        return file_id;
    }

    public void setFile_id(int file_id) {
        this.file_id = file_id;
    }
}
